#ifndef INC_DIAGRAMFAM_H
#define INC_DIAGRAMFAM_H

#include "../model/UMLDiagram.h" // clients will need this
#include "../view/UMLCanvas.h"
#include "Acceptor.h"

#include <boost/utility.hpp>
#include <boost/scoped_ptr.hpp>

/**
 * A happy family of a UMLDiagram and associated objects.
 *
 * Note: Not copyable because we don't want to copy the canvas!
 */
class DiagramFam : public boost::noncopyable
{
	public:
		/**
		 * @param diagram the family now owns your pointer
		 * @param canvasParent constructed canvas will have this parent
		 */
		DiagramFam(UMLDiagram*, QWidget* canvasParent, const QString& name = QString("[no name]"));

		/*** ACCESSORS ***/

		UMLDiagram& diagram();

		/**
		 * @return the DiagramFam-owned UMLCanvas associated with the diagram
		 */
		UMLCanvas& canvas();
		Acceptor& acceptor();
		const QString& name() const;

	private:
		boost::scoped_ptr<UMLDiagram> _diagram;
		UMLCanvas _canvas;
		Acceptor _acceptor;

		QString _name;
};

#endif // INC_DIAGRAMFAM_H

